package br.com.localfloripa.util;

import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.InputStream;

import javax.imageio.ImageIO;

import net.coobird.thumbnailator.Thumbnails;

public class ImageUtils {

	public ImageUtils() {
		
	}
	
	public static BufferedImage resizeImage(InputStream file,int height,int width) throws IOException {
		  
		BufferedImage originalImage = ImageIO.read(file);
		BufferedImage thumbnail = Thumbnails.of(originalImage).size(width, height).asBufferedImage();
		return thumbnail;
    }
	
	

}
